package com.tencent.wxcloudrun.config;

public enum ResultEnum {
    SEARCH_SUCCESS(true, "恭喜您,搜索成功"),
    SEARCH_FAILED(false, "很抱歉,查询失败"),
    UPDATE_SUCCESS(true, "恭喜您,修改成功"),
    UPDATE_FAILED(false, "很抱歉,修改失败"),
    DELETE_SUCCESS(true, "恭喜您,删除成功"),
    DELETE_FAILED(false, "很抱歉,删除失败"),
    FAIL_UPLOAD_SUCCESS(true, "恭喜您,上传成功"),
    FAIL_UPLOAD_FAILED(false, "很抱歉,上传失败,请重新尝试"),
    SIGN_SUCCESS(true, "恭喜您,注册成功"),
    SIGN_FAILED(false, "很抱歉,注册失败"),
    LOGIN_SUCCESS(true, "恭喜您,登陆成功"),
    USERNAME_UNDEFINED(false, "很抱歉,用户名不存在"),
    PASSWORD_FAILED(false, "密码错误,请重试"),
    SYSTEM_ERROR(false, "很抱歉,系统错误,请联系管理员"),
    LOGIN_TIME_OUT(false, "很抱歉,登陆已超时"),
    INSUFFICIENT_PRIVILEGES(false, "权限不足,无法操作")
    ;
    private final boolean success;
    private final String message;

    ResultEnum(boolean success, String message) {
        this.message = message;
        this.success = success;
    }
    public boolean getSuccess () {
        return success;
    }
    public String getMessage () {
        return message;
    }
}
